<template>
  <div class="page">
    <div class="title">发起客户挑战</div>
    <div class="content">
      <div class="name">已选客户</div>
      <div class="table">
        <vx-table :tableData="tableData" :columns="columns"> </vx-table>
      </div>
      <div class="footer">
        <div class="buttonBox">
          <ui-button class="default-btn" @click="back">返回</ui-button>
          <ui-button class="primary-btn" @click="submit">确认</ui-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import vxTable from '@/components/vx-table';
export default {
  name: '',
  components: {
    vxTable,
  },
  data() {
    return {
      tableData: [],
      columns: [
        {
          label: '客户号',
          prop: 'customId',
        },
        {
          label: '客户名称',
          prop: 'customName',
        },
        {
          label: '客户类型',
          prop: 'customType',
        },
        {
          label: '所属机构',
          prop: 'customType',
        },
        {
          label: '主办客户经理',
          prop: 'customType',
        },
        {
          label: '客户等级',
          prop: 'financialAssets',
          formatter: (row, column, cellValue, index) => {
            return row.customLevel;
          },
        },
      ],
      transferCustomInfo: {},
    };
  },
  mounted() {
    this.tableData = [JSON.parse(this.$route.query.customData)];
    console.log( this.tableData )
  },
  methods: {
    back() {
      this.$router.back();
    },
    submit() {
      this.$router.push('/customChallengeManager/launchCustomChallenge');
    },
    deleteCustom(row) {
      console.log(row);
    },
  },
};
</script>

<style lang="scss" scoped>
.page {
  .title {
    font-size: 18px;
    color: #000;
    font-weight: bold;
  }
  .stepContent {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
  }
  .content {
    padding: 16px;
    margin-top: 28px;
    background: #fff;
    .name {
      font-size: 14px;
      color: #262626;
      font-weight: bold;
    }
    .table {
      margin-top: 16px;
      .delete {
        background: #ffeae5;
        border: 1px solid #ffaba6;
        color: #f35052;
      }
      .transferNumber {
        margin-top: 16px;
        font-size: 14px;
        color: #262626;
        font-weight: bold;
        text-align: right;
      }
    }
    .footer {
      background: #fff;
      padding: 20px;

      .buttonBox {
        border-top: 1px solid #ccc;
        padding: 20px 10px 0 10px;
        margin: auto;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
  }
}
</style>